package com.xzx.annotation.custom;

import com.xzx.annotation.repository.Repository01;
import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.core.type.filter.TypeFilter;

import java.io.IOException;

/**
 * @author xinzhixuan
 * @version 1.0
 * @date 2025/4/17 15:05
 */
public class MyScanFilter implements TypeFilter {
    @Override
    public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) throws IOException {
        String className = metadataReader.getClassMetadata().getClassName();
        return Repository01.class.getName().equals(className);
    }
}
